package com.ineatconseil.yougo.beans;

import org.apache.tapestry5.beaneditor.NonVisual;
import org.apache.tapestry5.beaneditor.Validate;

/**
 * A user.
 * 
 * @author johanblo
 * 
 */
public class User {

	/**
	 * Unique identifier.
	 */
	@NonVisual
	private Long id;

	/**
	 * Full name.
	 */
	@Validate("required")
	private String fullName;

	/**
	 * Email.
	 */
	@Validate("required")
	private String email;

	/**
	 * User is admin ?
	 */
	@Validate("required")
	private Boolean admin;

	/**
	 * User is active ?
	 */
	@Validate("required")
	private Boolean active;

	/**
	 * The type identifier.
	 */
	@Validate("required")
	private Long typeId;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Boolean getAdmin() {
		return admin;
	}

	public void setAdmin(Boolean admin) {
		this.admin = admin;
	}

	public Boolean getActive() {
		return active;
	}

	public void setActive(Boolean active) {
		this.active = active;
	}

	public Long getTypeId() {
		return typeId;
	}

	public void setTypeId(Long typeId) {
		this.typeId = typeId;
	}

	public boolean isEmpty() {
		return this.fullName == null && this.email == null && this.id == null;
	}

}
